For loop breaks an unrelated array

join shbcf.ru